vtpmmgr: execute deep quote in locality 0
authorEmil Condrea <emilcondrea@gmail.com>
Wed, 15 Apr 2015 18:00:14 +0000 (21:00 +0300)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 16 Apr 2015 12:57:01 +0000 (13:57 +0100)
commit83d1be544cbcd81720d2617f94976e851ce780dc
treee093d046ca2758818153030566dc94d4362d88d9
parent588bb8aca7c7f22143f3bc6b83e8de68c425eb70
vtpmmgr: execute deep quote in locality 0

Enables deep quote execution for vtpmmgr which can not be started
using locality 2. Flags are used to request additional data to be
present when executing quote. They are interpreted as a bitmask of:
 * VTPM_QUOTE_FLAGS_HASH_UUID
 * VTPM_QUOTE_FLAGS_VTPM_MEASUREMENTS
 * VTPM_QUOTE_FLAGS_GROUP_INFO
 * VTPM_QUOTE_FLAGS_GROUP_PUBKEY

The externData param for TPM_Quote is calculated as:
externData = SHA1 (
       extraInfoFlags
       requestData
       [SHA1 (
          [SHA1 (UUIDs if requested)]
          [SHA1 (vTPM measurements if requested)]
          [SHA1 (vTPM group update policy if requested)]
          [SHA1 (vTPM group public key if requested)]
       ) if flags !=0 ]
)

The response param pcrValues is an array containing requested hashes used
for externData calculation : UUIDs, vTPM measurements, vTPM group update
policy, group public key. At the end of these hashes the PCR values are
appended.

Signed-off-by: Emil Condrea <emilcondrea@gmail.com>
Acked-by: Daniel De Graaf <dgdegra@tycho.nsa.gov>
stubdom/vtpmmgr/marshal.h
stubdom/vtpmmgr/mgmt_authority.c
stubdom/vtpmmgr/mgmt_authority.h
stubdom/vtpmmgr/vtpm_cmd_handler.c
stubdom/vtpmmgr/vtpm_manager.h